package org.elasticsearch.common.settings;

import java.io.Closeable;
import java.io.InputStream;
import java.security.GeneralSecurityException;
import java.util.Set;

public interface SecureSettings extends Closeable {

    /** Returns true iff the settings are loaded and retrievable. */
    boolean isLoaded();

    /** Returns the names of all secure settings available. */
    Set<String> getSettingNames();

    SecureString getString(String setting) throws GeneralSecurityException;

    /** Return a file setting. The {@link InputStream} should be closed once it is used. */
    InputStream getFile(String setting) throws GeneralSecurityException;
}